services:

  web:
    build:
      context: .
      dockerfile: dev.dockerfile
    depends_on:
      - db
      - redis
    ports:
      - "8000:8000"
    volumes:
      - .:/opt/app/source

  db:
    environment:
      POSTGRES_PASSWORD: mysecretdbpassword
    image: "postgres:15.6-bookworm"
    ports:
      - "5432:5432"
    volumes:
      - ./db:/var/lib/postgresql/data

  redis:
    image: "redis:6.2.14-bookworm"
    ports:
      - "6379:6379"
